<template>
  <div class="block">
    <el-pagination
      layout="prev, pager, next"
      :total="total"
      @current-change="handleClick"
    ></el-pagination>
  </div>
</template>

<script>
export default {
  name: "index",
  methods: {
    handleClick(pager) {
      this.$emit("addPagination", pager);
    },
  },
  props: {
    total: {
      type: Number,
      default: 10,
    },
  },
};
</script>

<style scoped></style>
